using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using Sispe.Entities;

namespace Sispe.Repository.Mapping
{
    public class AREA_LIQUIDACIONMap : EntityTypeConfiguration<AREA_LIQUIDACION>
    {
        public AREA_LIQUIDACIONMap()
        {
            // Primary Key
            this.HasKey(t => t.IdAreaLiquidacion);

            // Properties
            this.Property(t => t.IdAreaLiquidacion).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);

            this.Property(t => t.Descripcion)
                .IsRequired()
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("AREA_LIQUIDACION");
            this.Property(t => t.IdAreaLiquidacion).HasColumnName("IdAreaLiquidacion");
            this.Property(t => t.Descripcion).HasColumnName("Descripcion");
        }
    }
}
